/* 重置和基础样式 */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 布局相关 */
#root {
  height: 100vh;
  width: 100vw;
}

.ant-layout {
  min-height: 100vh !important;
  background: #fff !important;
}

.ant-layout-content {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

/* 导航栏样式 */
.ant-layout-header {
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  z-index: 100 !important;
  padding: 0 !important;
}

.ant-layout-sider {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06) !important;
}

/* 触发器样式 */
.trigger {
  padding: 0 24px;
  font-size: 18px;
  line-height: 64px;
  cursor: pointer;
}

.trigger:hover {
  color: #1890ff;
}

/* OCR页面样式 */
.ocr-page {
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.ocr-title {
  margin-bottom: 24px !important;
  position: relative;
  padding-left: 12px;
}

.ocr-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background: #1890ff;
  border-radius: 2px;
}

/* OCR页面布局 */
.ocr-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
}

.ocr-header {
  padding: 24px 24px 0;
  flex-shrink: 0;
}

.ocr-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.upload-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.control-section {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

/* 拖拽上传区域样式 */
.ant-upload-drag {
  padding: 40px 20px !important;
}

/* 文件信息提示样式 */
.file-info-alert {
  margin-bottom: 16px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

/* 结果区域样式 */
.result-section {
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
}

.result-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.result-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 6px;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}

/* 加载状态样式 */
.loading-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .ocr-content {
    padding: 16px;
  }

  .control-section {
    flex-direction: column;
    align-items: stretch;
  }

  .file-info-alert .ant-space {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Card 样式重置 */
.ant-card-body {
  padding: 16px !important;
}

.ant-card-head {
  padding: 0 16px !important;
  min-height: 48px !important;
}

.ant-card-head-title {
  font-size: 16px !important;
  padding: 12px 0 !important;
}

/* 转换页面样式 */
.convert-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 0;
}

.convert-result {
  text-align: center;
  padding: 24px;
  background: #f5f5f5;
  border-radius: 8px;
}

/* Tab样式调整 */
.ant-tabs-nav {
  margin-bottom: 24px !important;
}

.ant-tabs-tab {
  padding: 12px 24px !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* antd 样式覆盖 */
.ant-menu-inline {
  border-right: none !important;
}